package com.service.impl;

import com.mapper.SysRoleMapper;
import com.pojo.SysRole;
import com.service.SysRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SysRoleServiceImpl implements SysRoleService {
    @Autowired
    private SysRoleMapper mapper;
    @Override
    public List<SysRole> list(String roleName, Integer page, Integer limit) {
        Integer begin=(page-1)*limit;
        return mapper.list(begin,limit,roleName);
    }

    @Override
    public int count(String roleName) {
        return mapper.count(roleName);
    }

    @Override
    public int add(SysRole sysRole) {
        return mapper.add(sysRole);
    }

    @Override
    public int edit(SysRole sysRole) {
        return mapper.edit(sysRole);
    }

    @Override
    public int del(Integer id) {
        return mapper.del(id);
    }

    @Override
    public SysRole selectId(Integer id) {
        return mapper.selectId(id);
    }
}
